package it.low.game.client.gui.button;

import it.low.game.client.gui.input.InputKeyButton;

import javax.swing.JButton;


public class Button extends JButton {
	
	InputKeyButton inputKeyButton = null;
	
	public Button(InputKeyButton inputKeyButton){
		super(inputKeyButton.getInput());
		super.setMnemonic(inputKeyButton.getKeyCode());
		this.inputKeyButton = inputKeyButton;
	}
	
	public InputKeyButton getInputKeyButton(){
		return this.inputKeyButton;
	}
	
	public void pressButton(){
		this.inputKeyButton.pressInput();
	}
	
	public void relaseButton(){
		this.inputKeyButton.relaseInput();
	}
	
}
